﻿namespace _12306Demo.Service
{
    /// <summary>
    /// 服务状态上下文
    /// </summary>
    public class ServiceContext
    {
        public ServiceContext()
        {
            Session = new Session();
            DynamicDataService = new DynamicDataService(this);
            OrderQueueService = new OrderQueueService(this);
            OrderSubmitService = new OrderSubmitService(this);
            PassengerService = new PassengerService(this);
            StationDataService = new StationDataService(this);
            VerifyCodeService = new VerifyCodeService(this);
            TicketQueryService = new TicketQueryService(this);
            DataService = new DataService(this);
        }
        /// <summary>
        /// 数据服务
        /// </summary>
        public DataService DataService { get; set; }

        /// <summary>
        /// 获得当前的验证码服务
        /// </summary>
        public VerifyCodeService VerifyCodeService { get; set; }
        /// <summary>
        /// 获得当前的车站数据服务
        /// </summary>
        public StationDataService StationDataService { get; private set; }
        /// <summary>
        /// 获得当前的联系人服务
        /// </summary>
        public PassengerService PassengerService { get; set; }

        /// <summary>
        /// 获得当前的订单提交服务
        /// </summary>
        public OrderSubmitService OrderSubmitService { get; set; }
        /// <summary>
        /// 获得当前的订单排队服务
        /// </summary>
        public OrderQueueService OrderQueueService { get; set; }

        /// <summary>
        /// 获得当前的动态密钥服务
        /// </summary>
        public DynamicDataService DynamicDataService { get; set; }
        /// <summary>
        /// 获得当前的查票服务
        /// </summary>
        public TicketQueryService TicketQueryService { get; set; }

        /// <summary>
        /// 获得当前的会话状态
        /// </summary>
        public Session Session { get; set; }
    }
}